<template>
  <div class="app-container">
    <el-tabs v-model="currentTabName" @tab-click="handleClick">
      <el-tab-pane label="VIP客服" name="Service">
        <Service v-if="currentTabName === 'Service'" />
      </el-tab-pane>
      <el-tab-pane v-if="checkPermission(permissionRoles.vip_list)" label="VIP名单" name="List">
        <List v-if="currentTabName === 'List'" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import checkPermission from '@/utils/permission'
import List from './list'
import Service from './service'

export default {
  name: 'VIP',
  components: { List, Service },
  data() {
    return {
      permissionRoles: this.$store.state.user.permissionRoles,
      currentTabName: 'Service'
    }
  },
  methods: {
    checkPermission,
    handleClick() {}
  }
}
</script>
